/**
 * Created by lifan on 2015/11/15.
 */
var EventEmitter = require("events").EventEmitter;

var event = new EventEmitter();
event.on("some_event", function(arg1, arg2){
    console.log("some event occured once:"+arg1+" "+arg2);
});

event.on('some_event', function(){
    console.log('some event occured twice');
});

setTimeout(function(){
    event.emit('some_event', 'hello', 'world');
},1000);

event.on('error', function(){
    console.log('some error has occured');
});

event.emit('error');

